home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 June / ccd0605.iso / Software / Freeware / Programare / highlight / highlight-W32GUI-2.2-10b-Setup.exe / {app} / src / stringtools.h < prev    next >
C/C++ Source or Header  |  2005-01-05  |  2KB  |  58 lines

  1. /***************************************************************************
  2.                           stringtools.h  -  description
  3.                              -------------------
  4.     begin                : Mon Dec 10 2001
  5.     copyright            : (C) 2001 by AndrΘ Simon
  6.     email                : andre.simon1@gmx.de
  7.  ***************************************************************************/
  8.  
  9. /***************************************************************************
  10.  *                                                                         *
  11.  *   This program is free software; you can redistribute it and/or modify  *
  12.  *   it under the terms of the GNU General Public License as published by  *
  13.  *   the Free Software Foundation; either version 2 of the License, or     *
  14.  *   (at your option) any later version.                                   *
  15.  *                                                                         *
  16.  ***************************************************************************/
  17.  
  18. #ifndef STRINGTOOLS_H
  19. #define STRINGTOOLS_H
  20.  
  21. #include <string>
  22.  
  23. using namespace std;
  24.  
  25. /**\brief Contains methods for string manipulation
  26.   *@author Andre Simon
  27.   */
  28.  
  29. namespace StringTools
  30.   {
  31.  
  32.   /** \param s String
  33.       \returns lowercase string  */
  34.   string lowerCase(const string &s);
  35.  
  36.   /** \param s String
  37.       \returns Integer value */
  38.   int str2int(string s);
  39.  
  40.   /** \return true if c is alpa or underscore */
  41.   bool isAlpha(unsigned char c);
  42.  
  43.   /** \param value String
  44.      \return string trimmed on the left side
  45.   */
  46.   string trimRight(const string &value);
  47.  
  48.   /** \return next character in line starting from index, which is no whitespace*/
  49.   unsigned char getNextNonWs(const string &line, int index=0);
  50.  
  51.   /** \param s String, containing a opening and a closing paranthesis
  52.        \return value between "(", ")" */
  53.   string getParantheseVal(const string &s);
  54.  
  55. }
  56.  
  57. #endif
  58.